package java流程控制;

/**
 * @author Wangxin
 * @version 1.2
 * @date 2021/12/2 15:04
 * My stupid boss still prefers SVN .
 * my insist on my decision.
 */
public class StudyFor {
//    计算1-100的和
public static void main(String[] args) {
    int sum=0;
    for(int i=1;i<=100;i++){
            sum+=i;
    }
    System.out.println("for 循环的方式：sum="+sum);
    System.out.println("++++++");
    int m=0;
    int sum1=0;
    do{
        //思考一下为啥m=m++会有错误
//        System.out.println(m=m++);
        m++;
        sum1+=m;

    }while(m<100);
    System.out.println("do wihile 循环的方式：sum1="+sum1);
    int test=0;
    int tt=0;
    tt++;
    System.out.println(tt);

}

}
